<?php
	$orderNum = $_POST['orderNum'];
	
	
	$con = mysqli_connect('localhost','root','','cs2102') or die("fail");
	if(mysqli_connect_errno($con))
	{
		echo "error";
	}
	else
	{
		$query = "DELETE FROM orders where orderNum = \"$orderNum\" ";
		
		if(mysqli_query($con,$query)){
			echo "Success";
			}
		else{
			echo "Fail";
		}
	}
	
	mysqli_close($con);
	
	
?>